<div class="ranking">
	<div class="box-1">
		<div class="title">
			<div class="img">
				<img src="./images/yuanzhu.png">
			</div>
			<div class="tit1">热门资讯</div>
			<div class="tit2">日排行</div>
			<div class="tit3">· 周排行</div>
		</div>
		<div class="hot-text" id="hot_one">
		</div>
		<div id="hot_list">
		</div>
	</div>
</div>
<script type="text/javascript">
$(function(){
	//首页热门新闻
	var news_hot_message_url = 'http://'+document.domain+"/index/data/hot_message";
	$.ajax({
		type: 'POST',
        url: news_hot_message_url,
        data:{cat_id:1},
        dataType: 'json',
        success: function(result){
        	var html_one = '<img src="'+result[0]['img']+'" class="img">';
        	html_one += '<div class="hot-title">';
	        	html_one +='<a href="article.php?id='+result[0]['id']+'"><p>'+result[0]['title']+'</p></a>';
	        	html_one +='<div class="author">';
		        	html_one +='<div class="left">';
			        	html_one +='<a  href="author.php?id='+result[0]['user_id']+'" class="member_name">'+result[0]['member_name']+'</a>';
			        	html_one +='<img src="./images/dian.png" class="dian">';
			        	html_one +='<span>'+timestampToTime(result[0]['addtime'])+'</span>';
		        	html_one +='</div>';
		        	html_one +='<div class="right">';
			        	html_one +='<a href=""><img src="./images/zan.png"></a>';
			        	html_one +='<p>'+result[0]['like']+'</p>';
			        	html_one +='<a href=""><img src="./images/eye.png"></a>';
			        	html_one +='<p>'+result[0]['look']+'</p>';
		        	html_one +='</div>';
	        	html_one +='</div>';
        	html_one += '</div>';
        	var html = '';
			result.forEach((item,i=1)=>{
				html += '<div class="hot-text-list">';
					html += '<a href="article.php?id='+result[i]['id']+'"><img src="'+result[i]['img']+'" class="img"></a>';
					html += '<div class="hot-con">';
						html += '<a href="article.php?id='+result[i]['id']+'"><p>'+result[i]['title']+'</p></a>';
						html += '<div class="author">';
							html += '<div class="left">';
								html += '<a href="author.php?id='+result[i]['user_id']+'" class="member_name">'+result[i]['member_name']+'</a>';
								html += '<img src="./images/dian.png" class="dian">';
								html += '<span>'+timestampToTime(result[i]['addtime'])+'</span>';
							html += '</div>';
							html += '<div class="right">';
								html += '<a href=""><img src="./images/zan.png"></a>';
								html += '<p>'+result[i]['like']+'</p>';
								html += '<a href=""><img src="./images/eye.png"></a>';
								html += '<p>'+result[i]['look']+'</p>';
							html += '</div>';
						html += '</div>';
					html += '</div>';
				html += '</div>';
			})
			$('#hot_one').html(html_one);
			$('#hot_list').html(html);
        },
	})
})
</script>